package us.mifeng.basicvp.network.interceptor

import android.os.UserManager
import okhttp3.Interceptor
import okhttp3.Response

class TokenInterceptor : Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val originalRequest = chain.request()
        val builder = originalRequest.newBuilder()
        
        // 添加Token
        val token = "" // 这里应该从你的存储中获取Token，例如SharedPreferences或其他安全存储方式
        if (token.isNotEmpty()) {
            builder.addHeader("Authorization", "Bearer $token")
        }
        
        return chain.proceed(builder.build())
    }
}    